<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libxlsxwriter: data_validate.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libxlsxwriter
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">data_validate.c</div>  </div>
</div><!--header-->
<div class="contents">
<table width="600">
<tr>
<td><a class="el" href="autofilter_8c-example.html">&lt;&lt; autofilter.c</a> </td><td align="right"><a class="el" href="conditional_format1_8c-example.html">conditional_format1.c &gt;&gt;</a>  </td></tr>
</table>
<p>Example of adding data validations to a worksheet.</p>
<div class="image">
<img src="data_validate4.png" alt=""/>
</div>
<div class="fragment"><div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Examples of how to add data validation and dropdown lists using the</span></div>
<div class="line"><span class="comment"> * libxlsxwriter library.</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * Data validation is a feature of Excel which allows you to restrict the data</span></div>
<div class="line"><span class="comment"> * that a user enters in a cell and to display help and warning messages. It</span></div>
<div class="line"><span class="comment"> * also allows you to restrict input to values in a drop down list.</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * Copyright 2014-2018, John McNamara, jmcnamara@cpan.org</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;xlsxwriter.h&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Write some data to the worksheet.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><span class="keywordtype">void</span> write_worksheet_data(<a name="_a0"></a><a class="code" href="structlxw__worksheet.html">lxw_worksheet</a> *worksheet, <a name="_a1"></a><a class="code" href="structlxw__format.html">lxw_format</a> *format) {</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <a name="a2"></a><a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a name="a3"></a><a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A1&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Some examples of data validation in libxlsxwriter&quot;</span>,</div>
<div class="line">                           format);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B1&quot;</span>), <span class="stringliteral">&quot;Enter values in this column&quot;</span>, format);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;D1&quot;</span>), <span class="stringliteral">&quot;Sample Data&quot;</span>, format);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;D3&quot;</span>), <span class="stringliteral">&quot;Integers&quot;</span>, NULL);</div>
<div class="line">    <a name="a4"></a><a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;E3&quot;</span>), 1, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;F3&quot;</span>), 10, NULL);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;D4&quot;</span>), <span class="stringliteral">&quot;List Data&quot;</span>, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;E4&quot;</span>), <span class="stringliteral">&quot;open&quot;</span>, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;F4&quot;</span>), <span class="stringliteral">&quot;high&quot;</span>, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;G4&quot;</span>), <span class="stringliteral">&quot;close&quot;</span>, NULL);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,  <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;D5&quot;</span>), <span class="stringliteral">&quot;Formula&quot;</span>, NULL);</div>
<div class="line">    <a name="a5"></a><a class="code" href="worksheet_8h.html#ae57117f04c82bef29805ec3eabc219bb">worksheet_write_formula</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;E5&quot;</span>), <span class="stringliteral">&quot;=AND(F5=50,G5=60)&quot;</span>, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet,  <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;F5&quot;</span>), 50, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a>(worksheet,  <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;G5&quot;</span>), 60, NULL);</div>
<div class="line"> </div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/*</span></div>
<div class="line"><span class="comment"> * Create a worksheet with data validations.</span></div>
<div class="line"><span class="comment"> */</span></div>
<div class="line"><span class="keywordtype">int</span> main() {</div>
<div class="line"> </div>
<div class="line">    <a name="_a6"></a><a class="code" href="structlxw__workbook.html">lxw_workbook</a>        *workbook  = <a name="a7"></a><a class="code" href="workbook_8h.html#a1cf96608a23ee4eb0e8467c15240d00b">workbook_new</a>(<span class="stringliteral">&quot;data_validate1.xlsx&quot;</span>);</div>
<div class="line">    <a class="code" href="structlxw__worksheet.html">lxw_worksheet</a>       *worksheet = <a name="a8"></a><a class="code" href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a>(workbook, NULL);</div>
<div class="line">    <a name="_a9"></a><a class="code" href="structlxw__data__validation.html">lxw_data_validation</a> *data_validation = calloc(1, <span class="keyword">sizeof</span>(<a class="code" href="structlxw__data__validation.html">lxw_data_validation</a>));</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Add a format to use to highlight the header cells. */</span></div>
<div class="line">    <a class="code" href="structlxw__format.html">lxw_format</a> *format = <a name="a10"></a><a class="code" href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a>(workbook);</div>
<div class="line">    <a name="a11"></a><a class="code" href="format_8h.html#a9cf7a28a6e8014cb98dff27415e2b1ca">format_set_border</a>(format, <a name="a12"></a><a class="code" href="format_8h.html#a4d5e924b1acd9571fd5e0fe2615e9f8fa7ca212fb42e5816bb81d7b96ff623082">LXW_BORDER_THIN</a>);</div>
<div class="line">    <a name="a13"></a><a class="code" href="format_8h.html#a65086b2b6ee51fd34893e3c53e0578eb">format_set_fg_color</a>(format, 0xC6EFCE);</div>
<div class="line">    <a name="a14"></a><a class="code" href="format_8h.html#a85e1b0baf44b445b65894e48722aec14">format_set_bold</a>(format);</div>
<div class="line">    <a name="a15"></a><a class="code" href="format_8h.html#a56d55dd9257d8f0645c62b296d2c196d">format_set_text_wrap</a>(format);</div>
<div class="line">    <a name="a16"></a><a class="code" href="format_8h.html#a189c83d1f21b01937f1f730720c33d13">format_set_align</a>(format, <a name="a17"></a><a class="code" href="format_8h.html#adeeb0d70c7c873422d642323e7e1ecf5ae0a52569d3110521d3e9341809336063">LXW_ALIGN_VERTICAL_CENTER</a>);</div>
<div class="line">    <a name="a18"></a><a class="code" href="format_8h.html#a99aea699cd7bb3c56a515c9c9e0caa69">format_set_indent</a>(format, 1);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Write some data for the validations. */</span></div>
<div class="line">    write_worksheet_data(worksheet, format);</div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Set up layout of the worksheet. */</span></div>
<div class="line">    <a name="a19"></a><a class="code" href="worksheet_8h.html#a9656e4e05d3787eee6b3e4d8e82d9b7f">worksheet_set_column</a>(worksheet, 0, 0, 55, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#a9656e4e05d3787eee6b3e4d8e82d9b7f">worksheet_set_column</a>(worksheet, 1, 1, 15, NULL);</div>
<div class="line">    <a class="code" href="worksheet_8h.html#a9656e4e05d3787eee6b3e4d8e82d9b7f">worksheet_set_column</a>(worksheet, 3, 3, 15, NULL);</div>
<div class="line">    <a name="a20"></a><a class="code" href="worksheet_8h.html#ab9b7fb95e1bd9b0da70befd0d37a9173">worksheet_set_row</a>(worksheet, 0, 36, NULL);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 1. Limiting input to an integer in a fixed range.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A3&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter an integer between 1 and 10&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a name="a21"></a><a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a name="a22"></a><a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a name="a23"></a><a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a name="a24"></a><a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a name="a25"></a><a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">    data_validation-&gt;<a name="a26"></a><a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 10;</div>
<div class="line"> </div>
<div class="line">    <a name="a27"></a><a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B3&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 2. Limiting input to an integer outside a fixed range.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A5&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter an integer not between 1 and 10 (using cell references)&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>        = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>        = <a name="a28"></a><a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a name="a29"></a><a class="code" href="structlxw__data__validation.html#a5103f918e00ebc26d50adda3b4cd3026">minimum_formula</a> = <span class="stringliteral">&quot;=E3&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a name="a30"></a><a class="code" href="structlxw__data__validation.html#ab1acd165475bda9af44e8e27d93c0df3">maximum_formula</a> = <span class="stringliteral">&quot;=F3&quot;</span>;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B5&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 3. Limiting input to an integer greater than a fixed value.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A7&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter an integer greater than 0&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a name="a31"></a><a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">    data_validation-&gt;<a name="a32"></a><a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 0;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B7&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 4. Limiting input to an integer less than a fixed value.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A9&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter an integer less than 10&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a name="a33"></a><a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5ac6c585c5b61cf957cf1e88b8372ffc25">LXW_VALIDATION_CRITERIA_LESS_THAN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 10;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B9&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 5. Limiting input to a decimal in a fixed range.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A11&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter a decimal between 0.1 and 0.5&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a name="a34"></a><a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 0.1;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 0.5;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B11&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 6. Limiting input to a value in a dropdown list.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A13&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Select a value from a drop down list&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    <span class="keywordtype">char</span> *list[] = {<span class="stringliteral">&quot;open&quot;</span>, <span class="stringliteral">&quot;high&quot;</span>, <span class="stringliteral">&quot;close&quot;</span>, NULL};</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>   = <a name="a35"></a><a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>;</div>
<div class="line">    data_validation-&gt;<a name="a36"></a><a class="code" href="structlxw__data__validation.html#a7168c44107ed6b5c63f6b701b69cc50b">value_list</a> = list;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B13&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 7. Limiting input to a value in a dropdown list.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A15&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Select a value from a drop down list (using a cell range)&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>      = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a>;</div>
<div class="line">    data_validation-&gt;<a name="a37"></a><a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a> = <span class="stringliteral">&quot;=$E$4:$G$4&quot;</span>;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B15&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 8. Limiting input to a date in a fixed range.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A17&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter a date between 1/1/2008 and 12/12/2008&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    <a name="_a38"></a><a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime1 = {2008,  1,  1, 0, 0, 0};</div>
<div class="line">    <a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime2 = {2008, 12, 12, 0, 0, 0};</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a name="a39"></a><a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a name="a40"></a><a class="code" href="structlxw__data__validation.html#a9879f8968affead0bc9245ade4ae32aa">minimum_datetime</a> = datetime1;</div>
<div class="line">    data_validation-&gt;<a name="a41"></a><a class="code" href="structlxw__data__validation.html#aa1c41a46845b8dbbbba0c249517e9530">maximum_datetime</a> = datetime2;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B17&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 9. Limiting input to a time in a fixed range.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A19&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter a time between 6:00 and 12:00&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime3 = {0, 0, 0,  6, 0, 0};</div>
<div class="line">    <a class="code" href="structlxw__datetime.html">lxw_datetime</a> datetime4 = {0, 0, 0, 12, 0, 0};</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>         = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>         = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a9879f8968affead0bc9245ade4ae32aa">minimum_datetime</a> = datetime3;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aa1c41a46845b8dbbbba0c249517e9530">maximum_datetime</a> = datetime4;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B19&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 10. Limiting input to a string greater than a fixed length.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A21&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter a string longer than 3 characters&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>     = <a name="a42"></a><a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>     = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">value_number</a> = 3;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B21&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 11. Limiting input based on a formula.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A23&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Enter a value if the following is true \&quot;=AND(F5=50,G5=60)\&quot;&quot;</span>,</div>
<div class="line"> </div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>      = <a name="a43"></a><a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18">LXW_VALIDATION_TYPE_CUSTOM_FORMULA</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">value_formula</a> = <span class="stringliteral">&quot;=AND(F5=50,G5=60)&quot;</span>;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B23&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 12. Displaying and modifying data validation messages.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A25&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Displays a message when you select the cell&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 100;</div>
<div class="line">    data_validation-&gt;<a name="a44"></a><a class="code" href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">input_title</a>    = <span class="stringliteral">&quot;Enter an integer:&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a name="a45"></a><a class="code" href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">input_message</a>  = <span class="stringliteral">&quot;between 1 and 100&quot;</span>;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B25&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 13. Displaying and modifying data validation messages.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A27&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Display a custom error message when integer isn&#39;t between 1 and 100&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 100;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">input_title</a>    = <span class="stringliteral">&quot;Enter an integer:&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">input_message</a>  = <span class="stringliteral">&quot;between 1 and 100&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a name="a46"></a><a class="code" href="structlxw__data__validation.html#a3d2c14ba7d150130b18ee90e7bdea9c4">error_title</a>    = <span class="stringliteral">&quot;Input value is not valid!&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a name="a47"></a><a class="code" href="structlxw__data__validation.html#ad021ae9515ce8624db6819667dc10dc9">error_message</a>  = <span class="stringliteral">&quot;It should be an integer between 1 and 100&quot;</span>;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B27&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/*</span></div>
<div class="line"><span class="comment">     * Example 14. Displaying and modifying data validation messages.</span></div>
<div class="line"><span class="comment">     */</span></div>
<div class="line">    <a class="code" href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a>(worksheet,</div>
<div class="line">                           <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;A29&quot;</span>),</div>
<div class="line">                           <span class="stringliteral">&quot;Display a custom info message when integer isn&#39;t between 1 and 100&quot;</span>,</div>
<div class="line">                           NULL);</div>
<div class="line"> </div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">validate</a>       = <a class="code" href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">criteria</a>       = <a class="code" href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">minimum_number</a> = 1;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">maximum_number</a> = 100;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">input_title</a>    = <span class="stringliteral">&quot;Enter an integer:&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">input_message</a>  = <span class="stringliteral">&quot;between 1 and 100&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#a3d2c14ba7d150130b18ee90e7bdea9c4">error_title</a>    = <span class="stringliteral">&quot;Input value is not valid!&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a class="code" href="structlxw__data__validation.html#ad021ae9515ce8624db6819667dc10dc9">error_message</a>  = <span class="stringliteral">&quot;It should be an integer between 1 and 100&quot;</span>;</div>
<div class="line">    data_validation-&gt;<a name="a48"></a><a class="code" href="structlxw__data__validation.html#aee937cbcbba81e8d6261705686699529">error_type</a>     = <a name="a49"></a><a class="code" href="worksheet_8h.html#a814e4b2e983125351c617e44b73b8998a971dd668c9e360e76bde86a87fb373a7">LXW_VALIDATION_ERROR_TYPE_INFORMATION</a>;</div>
<div class="line"> </div>
<div class="line">    <a class="code" href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a>(worksheet, <a class="code" href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a>(<span class="stringliteral">&quot;B29&quot;</span>), data_validation);</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">    <span class="comment">/* Cleanup. */</span></div>
<div class="line">    free(data_validation);</div>
<div class="line"> </div>
<div class="line">    <span class="keywordflow">return</span> <a name="a50"></a><a class="code" href="workbook_8h.html#ad9e7aeebc0fd43562db5bcd527b2ee5e">workbook_close</a>(workbook);</div>
<div class="line">}</div>
</div><!-- fragment --> </div><!-- contents -->
<div class="ttc" id="astructlxw__data__validation_html_aba116e382c2276bd68fd910a73b6bf64"><div class="ttname"><a href="structlxw__data__validation.html#aba116e382c2276bd68fd910a73b6bf64">lxw_data_validation::value_formula</a></div><div class="ttdeci">char * value_formula</div><div class="ttdef"><b>Definition:</b> worksheet.h:858</div></div>
<div class="ttc" id="aworkbook_8h_html_ad9e7aeebc0fd43562db5bcd527b2ee5e"><div class="ttname"><a href="workbook_8h.html#ad9e7aeebc0fd43562db5bcd527b2ee5e">workbook_close</a></div><div class="ttdeci">lxw_error workbook_close(lxw_workbook *workbook)</div><div class="ttdoc">Close the Workbook object and write the XLSX file.</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a7d648cb7da5e14cb1ba1c446cd91f93f"><div class="ttname"><a href="structlxw__data__validation.html#a7d648cb7da5e14cb1ba1c446cd91f93f">lxw_data_validation::criteria</a></div><div class="ttdeci">uint8_t criteria</div><div class="ttdef"><b>Definition:</b> worksheet.h:807</div></div>
<div class="ttc" id="aformat_8h_html_a56d55dd9257d8f0645c62b296d2c196d"><div class="ttname"><a href="format_8h.html#a56d55dd9257d8f0645c62b296d2c196d">format_set_text_wrap</a></div><div class="ttdeci">void format_set_text_wrap(lxw_format *format)</div><div class="ttdoc">Wrap text in a cell.</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a0bb3f10cde1f055b844c10a2a75f0ac6"><div class="ttname"><a href="structlxw__data__validation.html#a0bb3f10cde1f055b844c10a2a75f0ac6">lxw_data_validation::input_message</a></div><div class="ttdeci">char * input_message</div><div class="ttdef"><b>Definition:</b> worksheet.h:938</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a93759c9248dd4a2f298a18f04db55a3b"><div class="ttname"><a href="structlxw__data__validation.html#a93759c9248dd4a2f298a18f04db55a3b">lxw_data_validation::input_title</a></div><div class="ttdeci">char * input_title</div><div class="ttdef"><b>Definition:</b> worksheet.h:929</div></div>
<div class="ttc" id="aformat_8h_html_adeeb0d70c7c873422d642323e7e1ecf5ae0a52569d3110521d3e9341809336063"><div class="ttname"><a href="format_8h.html#adeeb0d70c7c873422d642323e7e1ecf5ae0a52569d3110521d3e9341809336063">LXW_ALIGN_VERTICAL_CENTER</a></div><div class="ttdeci">@ LXW_ALIGN_VERTICAL_CENTER</div><div class="ttdef"><b>Definition:</b> format.h:153</div></div>
<div class="ttc" id="aworksheet_8h_html_ae57117f04c82bef29805ec3eabc219bb"><div class="ttname"><a href="worksheet_8h.html#ae57117f04c82bef29805ec3eabc219bb">worksheet_write_formula</a></div><div class="ttdeci">lxw_error worksheet_write_formula(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, const char *formula, lxw_format *format)</div><div class="ttdoc">Write a formula to a worksheet cell.</div></div>
<div class="ttc" id="astructlxw__data__validation_html"><div class="ttname"><a href="structlxw__data__validation.html">lxw_data_validation</a></div><div class="ttdoc">Worksheet data validation options.</div><div class="ttdef"><b>Definition:</b> worksheet.h:796</div></div>
<div class="ttc" id="aformat_8h_html_a189c83d1f21b01937f1f730720c33d13"><div class="ttname"><a href="format_8h.html#a189c83d1f21b01937f1f730720c33d13">format_set_align</a></div><div class="ttdeci">void format_set_align(lxw_format *format, uint8_t alignment)</div><div class="ttdoc">Set the alignment for data in the cell.</div></div>
<div class="ttc" id="astructlxw__data__validation_html_aee937cbcbba81e8d6261705686699529"><div class="ttname"><a href="structlxw__data__validation.html#aee937cbcbba81e8d6261705686699529">lxw_data_validation::error_type</a></div><div class="ttdeci">uint8_t error_type</div><div class="ttdef"><b>Definition:</b> worksheet.h:837</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a9879f8968affead0bc9245ade4ae32aa"><div class="ttname"><a href="structlxw__data__validation.html#a9879f8968affead0bc9245ade4ae32aa">lxw_data_validation::minimum_datetime</a></div><div class="ttdeci">lxw_datetime minimum_datetime</div><div class="ttdef"><b>Definition:</b> worksheet.h:901</div></div>
<div class="ttc" id="aworkbook_8h_html_a1cf96608a23ee4eb0e8467c15240d00b"><div class="ttname"><a href="workbook_8h.html#a1cf96608a23ee4eb0e8467c15240d00b">workbook_new</a></div><div class="ttdeci">lxw_workbook * workbook_new(const char *filename)</div><div class="ttdoc">Create a new workbook object.</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a3d2c14ba7d150130b18ee90e7bdea9c4"><div class="ttname"><a href="structlxw__data__validation.html#a3d2c14ba7d150130b18ee90e7bdea9c4">lxw_data_validation::error_title</a></div><div class="ttdeci">char * error_title</div><div class="ttdef"><b>Definition:</b> worksheet.h:946</div></div>
<div class="ttc" id="aformat_8h_html_a9cf7a28a6e8014cb98dff27415e2b1ca"><div class="ttname"><a href="format_8h.html#a9cf7a28a6e8014cb98dff27415e2b1ca">format_set_border</a></div><div class="ttdeci">void format_set_border(lxw_format *format, uint8_t style)</div><div class="ttdoc">Set the cell border style.</div></div>
<div class="ttc" id="aformat_8h_html_a85e1b0baf44b445b65894e48722aec14"><div class="ttname"><a href="format_8h.html#a85e1b0baf44b445b65894e48722aec14">format_set_bold</a></div><div class="ttdeci">void format_set_bold(lxw_format *format)</div><div class="ttdoc">Turn on bold for the format font.</div></div>
<div class="ttc" id="aworksheet_8h_html_a814e4b2e983125351c617e44b73b8998a971dd668c9e360e76bde86a87fb373a7"><div class="ttname"><a href="worksheet_8h.html#a814e4b2e983125351c617e44b73b8998a971dd668c9e360e76bde86a87fb373a7">LXW_VALIDATION_ERROR_TYPE_INFORMATION</a></div><div class="ttdeci">@ LXW_VALIDATION_ERROR_TYPE_INFORMATION</div><div class="ttdef"><b>Definition:</b> worksheet.h:204</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca9e8f789b6ae1df30d4a8fc08aca931bf">LXW_VALIDATION_TYPE_LENGTH</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_LENGTH</div><div class="ttdef"><b>Definition:</b> worksheet.h:152</div></div>
<div class="ttc" id="astructlxw__data__validation_html_acc19c667d02e2e5e917216bc077b2ade"><div class="ttname"><a href="structlxw__data__validation.html#acc19c667d02e2e5e917216bc077b2ade">lxw_data_validation::minimum_number</a></div><div class="ttdeci">double minimum_number</div><div class="ttdef"><b>Definition:</b> worksheet.h:889</div></div>
<div class="ttc" id="astructlxw__worksheet_html"><div class="ttname"><a href="structlxw__worksheet.html">lxw_worksheet</a></div><div class="ttdoc">Struct to represent an Excel worksheet.</div><div class="ttdef"><b>Definition:</b> worksheet.h:1603</div></div>
<div class="ttc" id="astructlxw__data__validation_html_abc1601dcfcd8e7d7172984fb34e14626"><div class="ttname"><a href="structlxw__data__validation.html#abc1601dcfcd8e7d7172984fb34e14626">lxw_data_validation::maximum_number</a></div><div class="ttdeci">double maximum_number</div><div class="ttdef"><b>Definition:</b> worksheet.h:907</div></div>
<div class="ttc" id="astructlxw__format_html"><div class="ttname"><a href="structlxw__format.html">lxw_format</a></div><div class="ttdoc">Struct to represent the formatting properties of an Excel format.</div><div class="ttdef"><b>Definition:</b> format.h:358</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a7168c44107ed6b5c63f6b701b69cc50b"><div class="ttname"><a href="structlxw__data__validation.html#a7168c44107ed6b5c63f6b701b69cc50b">lxw_data_validation::value_list</a></div><div class="ttdeci">char ** value_list</div><div class="ttdef"><b>Definition:</b> worksheet.h:877</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca6f1306cd335680b95c51a4d97fcfb36c">LXW_VALIDATION_TYPE_DECIMAL</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_DECIMAL</div><div class="ttdef"><b>Definition:</b> worksheet.h:117</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a5d447b6753a600ad638b27cb1fd596d1">LXW_VALIDATION_CRITERIA_GREATER_THAN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_GREATER_THAN</div><div class="ttdef"><b>Definition:</b> worksheet.h:183</div></div>
<div class="ttc" id="astructlxw__data__validation_html_ab1acd165475bda9af44e8e27d93c0df3"><div class="ttname"><a href="structlxw__data__validation.html#ab1acd165475bda9af44e8e27d93c0df3">lxw_data_validation::maximum_formula</a></div><div class="ttdeci">char * maximum_formula</div><div class="ttdef"><b>Definition:</b> worksheet.h:913</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4cad84ccc6ea31ad28577827a432ec51c18">LXW_VALIDATION_TYPE_CUSTOM_FORMULA</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_CUSTOM_FORMULA</div><div class="ttdef"><b>Definition:</b> worksheet.h:160</div></div>
<div class="ttc" id="astructlxw__datetime_html"><div class="ttname"><a href="structlxw__datetime.html">lxw_datetime</a></div><div class="ttdoc">Struct to represent a date and time in Excel.</div><div class="ttdef"><b>Definition:</b> common.h:152</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca7d721cc2b76618d8d2fb105ca4717de0">LXW_VALIDATION_TYPE_LIST</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_LIST</div><div class="ttdef"><b>Definition:</b> worksheet.h:124</div></div>
<div class="ttc" id="aformat_8h_html_a65086b2b6ee51fd34893e3c53e0578eb"><div class="ttname"><a href="format_8h.html#a65086b2b6ee51fd34893e3c53e0578eb">format_set_fg_color</a></div><div class="ttdeci">void format_set_fg_color(lxw_format *format, lxw_color_t color)</div><div class="ttdoc">Set the pattern foreground color for a cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca0952e8f509c60eca7015ac69ed47b4e5">LXW_VALIDATION_TYPE_INTEGER</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_INTEGER</div><div class="ttdef"><b>Definition:</b> worksheet.h:110</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a4495d388fd38d3824db6d8b7af3cdecc"><div class="ttname"><a href="structlxw__data__validation.html#a4495d388fd38d3824db6d8b7af3cdecc">lxw_data_validation::validate</a></div><div class="ttdeci">uint8_t validate</div><div class="ttdef"><b>Definition:</b> worksheet.h:801</div></div>
<div class="ttc" id="astructlxw__data__validation_html_a5103f918e00ebc26d50adda3b4cd3026"><div class="ttname"><a href="structlxw__data__validation.html#a5103f918e00ebc26d50adda3b4cd3026">lxw_data_validation::minimum_formula</a></div><div class="ttdeci">char * minimum_formula</div><div class="ttdef"><b>Definition:</b> worksheet.h:895</div></div>
<div class="ttc" id="astructlxw__workbook_html"><div class="ttname"><a href="structlxw__workbook.html">lxw_workbook</a></div><div class="ttdoc">Struct to represent an Excel workbook.</div><div class="ttdef"><b>Definition:</b> workbook.h:273</div></div>
<div class="ttc" id="astructlxw__data__validation_html_ae57eda5fa066ce0d318f290a759631b7"><div class="ttname"><a href="structlxw__data__validation.html#ae57eda5fa066ce0d318f290a759631b7">lxw_data_validation::value_number</a></div><div class="ttdeci">double value_number</div><div class="ttdef"><b>Definition:</b> worksheet.h:851</div></div>
<div class="ttc" id="astructlxw__data__validation_html_ad021ae9515ce8624db6819667dc10dc9"><div class="ttname"><a href="structlxw__data__validation.html#ad021ae9515ce8624db6819667dc10dc9">lxw_data_validation::error_message</a></div><div class="ttdeci">char * error_message</div><div class="ttdef"><b>Definition:</b> worksheet.h:957</div></div>
<div class="ttc" id="aworksheet_8h_html_ac208046e7a6d12cc87982422efa41b31"><div class="ttname"><a href="worksheet_8h.html#ac208046e7a6d12cc87982422efa41b31">worksheet_write_string</a></div><div class="ttdeci">lxw_error worksheet_write_string(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, const char *string, lxw_format *format)</div><div class="ttdoc">Write a string to a worksheet cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_ab9b7fb95e1bd9b0da70befd0d37a9173"><div class="ttname"><a href="worksheet_8h.html#ab9b7fb95e1bd9b0da70befd0d37a9173">worksheet_set_row</a></div><div class="ttdeci">lxw_error worksheet_set_row(lxw_worksheet *worksheet, lxw_row_t row, double height, lxw_format *format)</div><div class="ttdoc">Set the properties for a row of cells.</div></div>
<div class="ttc" id="aworksheet_8h_html_ad9fc47d3beaa2ab4759414e8580c2289"><div class="ttname"><a href="worksheet_8h.html#ad9fc47d3beaa2ab4759414e8580c2289">worksheet_write_number</a></div><div class="ttdeci">lxw_error worksheet_write_number(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, double number, lxw_format *format)</div><div class="ttdoc">Write a number to a worksheet cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_a70c4b9cfb27b18258117545ac6ce6da0"><div class="ttname"><a href="worksheet_8h.html#a70c4b9cfb27b18258117545ac6ce6da0">worksheet_data_validation_cell</a></div><div class="ttdeci">lxw_error worksheet_data_validation_cell(lxw_worksheet *worksheet, lxw_row_t row, lxw_col_t col, lxw_data_validation *validation)</div><div class="ttdoc">Add a data validation to a cell.</div></div>
<div class="ttc" id="aworksheet_8h_html_a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b"><div class="ttname"><a href="worksheet_8h.html#a20e0dbd70400f2eb7c5d88696f812b4ca85eedf0278f7bf4d86de1bde505afd5b">LXW_VALIDATION_TYPE_DATE</a></div><div class="ttdeci">@ LXW_VALIDATION_TYPE_DATE</div><div class="ttdef"><b>Definition:</b> worksheet.h:131</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5aadc0c03ed751e7be70a4adad2797dacd">LXW_VALIDATION_CRITERIA_NOT_BETWEEN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_NOT_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:174</div></div>
<div class="ttc" id="aworksheet_8h_html_a9656e4e05d3787eee6b3e4d8e82d9b7f"><div class="ttname"><a href="worksheet_8h.html#a9656e4e05d3787eee6b3e4d8e82d9b7f">worksheet_set_column</a></div><div class="ttdeci">lxw_error worksheet_set_column(lxw_worksheet *worksheet, lxw_col_t first_col, lxw_col_t last_col, double width, lxw_format *format)</div><div class="ttdoc">Set the properties for one or more columns of cells.</div></div>
<div class="ttc" id="aformat_8h_html_a4d5e924b1acd9571fd5e0fe2615e9f8fa7ca212fb42e5816bb81d7b96ff623082"><div class="ttname"><a href="format_8h.html#a4d5e924b1acd9571fd5e0fe2615e9f8fa7ca212fb42e5816bb81d7b96ff623082">LXW_BORDER_THIN</a></div><div class="ttdeci">@ LXW_BORDER_THIN</div><div class="ttdef"><b>Definition:</b> format.h:295</div></div>
<div class="ttc" id="autility_8h_html_ad510ac6df573d23203374e24dba373d2"><div class="ttname"><a href="utility_8h.html#ad510ac6df573d23203374e24dba373d2">CELL</a></div><div class="ttdeci">#define CELL(cell)</div><div class="ttdoc">Convert an Excel A1 cell string into a (row, col) pair.</div><div class="ttdef"><b>Definition:</b> utility.h:45</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5ac6c585c5b61cf957cf1e88b8372ffc25"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5ac6c585c5b61cf957cf1e88b8372ffc25">LXW_VALIDATION_CRITERIA_LESS_THAN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_LESS_THAN</div><div class="ttdef"><b>Definition:</b> worksheet.h:186</div></div>
<div class="ttc" id="aworkbook_8h_html_a81d456b4f65a464e78e4a0030ecc3c2e"><div class="ttname"><a href="workbook_8h.html#a81d456b4f65a464e78e4a0030ecc3c2e">workbook_add_worksheet</a></div><div class="ttdeci">lxw_worksheet * workbook_add_worksheet(lxw_workbook *workbook, const char *sheetname)</div><div class="ttdoc">Add a new worksheet to a workbook.</div></div>
<div class="ttc" id="astructlxw__data__validation_html_aa1c41a46845b8dbbbba0c249517e9530"><div class="ttname"><a href="structlxw__data__validation.html#aa1c41a46845b8dbbbba0c249517e9530">lxw_data_validation::maximum_datetime</a></div><div class="ttdeci">lxw_datetime maximum_datetime</div><div class="ttdef"><b>Definition:</b> worksheet.h:919</div></div>
<div class="ttc" id="aformat_8h_html_a99aea699cd7bb3c56a515c9c9e0caa69"><div class="ttname"><a href="format_8h.html#a99aea699cd7bb3c56a515c9c9e0caa69">format_set_indent</a></div><div class="ttdeci">void format_set_indent(lxw_format *format, uint8_t level)</div><div class="ttdoc">Set the cell text indentation level.</div></div>
<div class="ttc" id="aworksheet_8h_html_a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9"><div class="ttname"><a href="worksheet_8h.html#a88eed033ce0af97d5151528bc514fbf5a2f5a8dc34e8bd8b298372f2a09102bd9">LXW_VALIDATION_CRITERIA_BETWEEN</a></div><div class="ttdeci">@ LXW_VALIDATION_CRITERIA_BETWEEN</div><div class="ttdef"><b>Definition:</b> worksheet.h:171</div></div>
<div class="ttc" id="aworkbook_8h_html_a279a5d7075d09a3931aae9782afede33"><div class="ttname"><a href="workbook_8h.html#a279a5d7075d09a3931aae9782afede33">workbook_add_format</a></div><div class="ttdeci">lxw_format * workbook_add_format(lxw_workbook *workbook)</div><div class="ttdoc">Create a new Format object to formats cells in worksheets.</div></div>
<!-- HTML footer for doxygen 1.8.20-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Copyright 2014-2020 John McNamara.
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
